package com.example.administrator.liangcang.until;

import android.app.Application;

import com.example.administrator.liangcang.callback.LiangCangService;

import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by Administrator on 2017/1/14.
 */
public class BaseApplication extends Application{
    private LiangCangService service;
    @Override
    public void onCreate() {
        super.onCreate();
        service = new Retrofit.Builder()
                .baseUrl("http://mobile.iliangcang.com/")
                .addConverterFactory(GsonConverterFactory.create())
                .build()
                .create(LiangCangService.class);
    }
    public LiangCangService getService() {
        return service;
    }
}
